<?php
/**
 * 开发环境 配制文件
 *
 */

$GLOBALS['g_sdo_app_store_config'] = array(
    //Memcache
    'cache_physical' => array(
        1 => array('host' => '10.150.28.11', 'port' => 11551),
        2 => array('host' => '10.150.28.11', 'port' => 11552),
        3 => array('host' => '10.150.28.11', 'port' => 11553),
        4 => array('host' => '10.150.28.11', 'port' => 11554),
        5 => array('host' => '10.150.28.11', 'port' => 11555),
        6 => array('host' => '10.150.28.11', 'port' => 11556),
        7 => array('host' => '10.150.28.11', 'port' => 11557),
        
        11 => array('host' => '10.150.28.12', 'port' => 11551),
        12 => array('host' => '10.150.28.12', 'port' => 11552),
        13 => array('host' => '10.150.28.12', 'port' => 11553),
        14 => array('host' => '10.150.28.12', 'port' => 11554),
        15 => array('host' => '10.150.28.12', 'port' => 11555),
        16 => array('host' => '10.150.28.12', 'port' => 11556),
        17 => array('host' => '10.150.28.12', 'port' => 11557),
        
        21 => array('host' => '10.150.28.13', 'port' => 11551),
        22 => array('host' => '10.150.28.13', 'port' => 11552),
        23 => array('host' => '10.150.28.13', 'port' => 11553),
        24 => array('host' => '10.150.28.13', 'port' => 11554),
        25 => array('host' => '10.150.28.13', 'port' => 11555),
        26 => array('host' => '10.150.28.13', 'port' => 11556),
        27 => array('host' => '10.150.28.13', 'port' => 11557),
        
        31 => array('host' => '10.150.28.14', 'port' => 11551),
        32 => array('host' => '10.150.28.14', 'port' => 11552),
        33 => array('host' => '10.150.28.14', 'port' => 11553),
        34 => array('host' => '10.150.28.14', 'port' => 11554),
        35 => array('host' => '10.150.28.14', 'port' => 11555),
        36 => array('host' => '10.150.28.14', 'port' => 11556),
        37 => array('host' => '10.150.28.14', 'port' => 11557),
    ),
    
    //数据库物理地址
    'db_physical' => array(
        1 => array(
            'write' => array('host' => '10.150.25.11', 'port' => 3306),
            'read'  => array('host' => '10.150.25.11', 'port' => 3306),
        ),
        2 => array(
            'write' => array('host' => '10.150.25.12', 'port' => 3306),
            'read'  => array('host' => '10.150.25.12', 'port' => 3306),
        ),
        3 => array(
            'write' => array('host' => '10.150.25.13', 'port' => 3306),
            'read'  => array('host' => '10.150.25.13', 'port' => 3306),
        ),
        4 => array(
            'write' => array('host' => '10.150.25.14', 'port' => 3306),
            'read'  => array('host' => '10.150.25.14', 'port' => 3306),
        ),
        5 => array(
            'write' => array('host' => '10.150.25.16', 'port' => 3306),
            'read' => array('host'  => '10.150.25.16', 'port' => 3306),
        ),
        6 => array(
            'write' => array('host' => '10.150.25.17', 'port' => 3306),
            'read' => array('host'  => '10.150.25.17', 'port' => 3306),
        ),
        'db_user' => 'appstore_user',
        'db_pwd'  => 'Dev@)%!*',
    ),
   
    'db_cluster' => array(
        'user_app' => array(
            'map' => array(
                'rule' => create_function('$farmId', 'return $farmId % 6 + 1;')
            ),               
            'db_name_prefix' => 'oa_user_app_',
            'farm_count'     => 256,
            'farm_policy'    => 'sdo_app_store_partition_256_by_md5_hash',
        ),
        
        'app_user' => array(
            'map' => array(
                'rule' => create_function('$farmId', 'return $farmId % 6 + 1;') 
            ), 
            'db_name_prefix' => 'oa_app_user_',
            'farm_count'     => 256,
            'farm_policy'    => 'sdo_app_store_partition_256_by_md5_hash',
        ),
    ),

    'db_singles' => array(
        'app_store' => array(
            'map'     => 1,
            'db_name' => 'oa_app_store',
        ),
    ),
    
    'cache_cluster' => array(
        'appinfo'     => array(1, 11, 21, 31),
        'share'   => array(2, 3, 4, 5, 6, 12, 13, 14, 15, 16, 22, 23, 24, 25, 26),
    ),
    
    'app_img_prefix' => 'http://pic.sdo.com/uploads/images/',
    
    'app_store_base_url' => 'http://apps.sdo.com',
);
